/**
 * Copyright (C) 2013 SHANGHAI VOLKSWAGEN, All rights reserved.
 * License version 1.0, a copy of which has been included with this.
 *
 * @File name：com.market.cart.common.domain.DeliveryAddress
 * @Create on：2024/3/10
 * @Author：liuchang
 */
package com.market.cart.common.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * <p>ClassName：DeliveryAddress</p >
 * <p>Description：</p >
 * <p>Author：liuchang</p >
 * <p>Date：2024/3/10</p >
 */
@Data
public class DeliveryAddress {

    private Integer addressId;//id
    private Integer userId;//用户ID
    @NotBlank(message = "姓名不能为空")
    private String receiverName;//收货人姓名
    //
    @Pattern(regexp = "^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[189]))\\d{8}$",message = "手机号格式错误")
    private String receiverPhone;//收货人联系电话
    @NotBlank(message = "省市县不能为空")
    private String address;
    @NotBlank(message = "详情地址不能为空")
    private String addressDetails;//详细地址
    private Integer isDefault;//是否为默认地址1.是2.否
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createdAt;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updatedAt;//更新时间



}
